﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Koonsoft.HYCRM.BLL;

public partial class Task_MyTask : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            BindData();
        }
    }

    private void BindData()
    {
        int empolyeeID = new EmpolyeeBLL().GetEmpolyeeInfoByLoginName(User.Identity.Name).EmpolyeeID;
        int branchID = new BranchBLL().GetBranchIDByLoginName(User.Identity.Name);
        int year = DateTime.Now.Year;
        int month = DateTime.Now.Month;

        ListView1.DataSource = new TasksBLL().GetEmpolyeeTasks(branchID, empolyeeID, month,year);
        ListView1.DataBind();
    }
}